<extend name="Public:base" />
<!-- 网站标题 -->
<block name="title">页面管理</block>
<block name="appendheader">
    
	<!-- 删除确认插件 --> 
	<script type="text/javascript" src="__PUBLIC__/artDialog/jquery.artDialog.js?skin=default"></script> 
	<script type="text/javascript" src="__PUBLIC__/artDialog/iframeTools.js"></script> 
	<script type="text/javascript" src="__PUBLIC__/common/js/list.js"></script>
	
	<!-- Validform_v5.3.2验证框架 -->
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Validform/css/Validform_v5.3.2.css"/>
	<script type="text/javascript" src="__PUBLIC__/Validform/js/Validform_v5.3.2_min.js"></script>
	
	<!-- 拖动排序放于tooltip之前，否则会影响 -->
	<script type="text/javascript" src="__PUBLIC__/common/js/jquery-ui.js"></script>
	
	<!-- 弹出提示插件 -->
	<script src="__PUBLIC__/bootstrap/js/tooltip.js"></script>
	
	
	<!--编辑器js引入-->
	<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
     
	<!-- 选中当前菜单引入 -->
	<script type="text/javascript">
		$(function() {
			$("#WebMenu-2000").addClass('active');	//选中父菜单
			$("#WebMenu-2009").addClass('active');	//选中当前菜单
		});
	</script>
	
	<script type="text/javascript">
		//选中左侧菜单
		$(function () {
			

			$("span.option-move").bind('mouseover',function() {
				$(this).css("cursor", "move");
			});
			//普通选项退拽排序
			$(".general-option").sortable({
				axis:'y',
				opacity: 0.6,
				revert: true,
				cursor: 'move',
				handle: '.option-move'
			});
			
			//tooltip提示工具
			
			$('[data-toggle="tooltip"]').tooltip();
		});
		
		 

	
		$(function() {
			var editor;
			var myform=$("#myform").Validform({
				tiptype:3,
				label:".label",
				showAllError:true,
				postonce:true,//开启二次提交防御
				ajaxPost:false,
				beforeSubmit:function(curform) {
					//在验证成功后，表单提交前执行的函数，curform参数是当前表单对象。
					lockScreen();
				},
				callback:function(data){
					$.Hidemsg();
				}
			});
			myform.addRule([{
				ele:"#score",
				datatype:"/^[0-9]+.?[0-9]*$/",
		        nullmsg:"必须为数字，可以有小数"
			},
			{
				ele:"#title",
				datatype:"*1-100",
				nullmsg:"字段长度为1-100"
			}]);
		});
	</script>
</block>
<!-- 当前位置 -->
<block name="breadcrumb">
	<div class="page-header pull-left">
		<div class="page-title">问卷管理</div>
	</div>
	<ol class="breadcrumb page-breadcrumb pull-left">
		<li><i class="fa fa-home"></i>&nbsp;<a href="__APP__?g=Admin">首页</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
		<li><a href="#">基础数据</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
		<li class="active">问卷管理</li>
	</ol>
</block>
<block name="main_content">
	<div class="panel panel-default">
		<div class="panel-heading clearfix" >
			<h3 class="mts pull-left">修改选择器</h3>
			<div class="btn-add-content" style="text-align: right;">
				<a href="__APP__?g={:GROUP_NAME}&m=QuestionTestEdit&a=index&formid={$Think.request.formid}&mode=edit" class="btn btn-success "><i class="fa fa-reply"></i>返回问卷预览</a>&nbsp;&nbsp;
			</div>
		</div>
		<div class="panel-body mt-15">
			<form id="myform" action="__APP__?g=Admin&m=ComSelect&mode=edit&a=update" onsubmit="return check_form();" method="post" class="form-horizontal">
				<div class="form-group">
					<label class="col-md-2 control-label" for="title">标题<span class='require'>*</span></label>
					<div class="col-md-8">
						<input type="text" id="title" name="title" class="form-control" value="{$data.title}"/>
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-md-2 control-label" for="code">代码</label>
					<div class="col-md-8">
						<input type="text" id="title" name="code" class="form-control" value="{$data.code}"/>
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-md-2 control-label">说明</label>
						<div class="col-md-8" >
							<textarea id="content" name="intro" style="height:100px;">{$data.intro}</textarea>
							<script type="text/javascript">
			 					UE.getEditor('content');
							</script> 
						</div>
				</div>
					<div class="form-group">
					<label class="col-md-2 control-label" for="score">分值<span class='require'>*</span></label>
					<div class="col-md-8">
						<input type="text" id="score" name="score" class="form-control" value="{$data.score}"/>
					</div>
				</div>
									
				<div class="form-group">
					<label class="col-md-2 control-label">选择器类型</label>
					<div class="col-md-9">
						<div class="radio">
							<volist name="type_list" id="vo">
								<label class="radio-inline"><input value="{$vo.id}" name="type"  type="radio" <eq name="data.type" value="$vo.id">checked</eq> />&nbsp;{$vo.name}</label>
							</volist>
						</div>
					</div>
				</div>
				<div class="form-group">
					<div class="col-md-9 col-md-offset-2">
						<input type="hidden" name="questionid" value="{$Think.request.questionid}" />
						<input type="hidden" name="formid" value="{$Think.request.formid}" />
						<input type="submit" value="保存" class="btn btn-primary" />&nbsp;&nbsp;
						<input type="button" onclick="history.go(-1)" value="返回" class="btn btn-green" />
					</div>
				</div>
			</form>
		</div>
	</div>
</block>